﻿<title>{$webTitle}-{:config("web_webname")}</title>
 <div class="app-header t-v bg-dlan dk b-hui"> 
   <span class="header-l t-v nowrap" onclick="x.mclose();"><i class="icon icon-pleft f9"></i>返回</span> 
   <span class="header-c t-v t-c nowrap">代理后台</span> 
   <span class="header-r t-v t-r nowrap" onclick=""><i class="icon  f10"></i></span> 
  </div> 
  <div class="app-content f5"> 
   <div class="mb5"> 
    <ul class="mt3 bt bb"> 
     <li class="h9"><span class="wh t-v"> <div class="w10 h t-v t-c"><i class="icon icon-moneybag f11 cheng"></i></div> <div class="h t-v bb"> <div class="w20">账户余额</div> <div class="w40 f2 t-r nowrap lv userrmb">{$userInfo['money']} 元</div> <div class="w5 t-c f2 hui"><i class="icon icon-pright"></i></div> </div> </span></li>
	<li class="h9"><span class="wh t-v"> <div class="w10 h t-v t-c"><i class="icon icon-goodsfavor f11 lan"></i></div> <div class="h t-v bb"> <p class="w20">我的折扣</p> <p class="w40 f2 t-r nowrap fen">{:config('sys_dl_give_z_'.$userInfo['dlpower'])} 折</p> <p class="w5 t-c f2 hui"><i class="icon icon-pright"></i></p> </div> </span></li>
	<li class="h9"><span class="wh t-v"> <div class="w10 h t-v t-c"><i class="icon icon-profile f11 lv"></i></div> <div class="h t-v bb"> <p class="w20">平台代理</p> <p class="w40 f2 t-r nowrap cheng">{$userInfo.dlpower|is_Daili}</p> <p class="w5 t-c f2 hui"><i class="icon icon-pright"></i></p> </div> </span></li>
    </ul> 
	<ul class="mt3 bt bb"> 
     <div class="g-content p5">
					<div class="pt1 pb3 in-text">
						<dt class="bold bb pr2">充值UID</dt>
						<dd><input type="text" class="form w h8 bb" name="uid" placeholder="请输入需要充值的用户UID" value="" onkeypress="return x.ints(this,8,1);" autocomplete="off"></dd>
					</div>
					<div class="pt1 pb3 in-text">
						<dt class="bold bb pr2">开通业务</dt>
						<dd><select class="form w h8 bb" name="type">
							<option value="vip">VIP会员</option>
							<option value="peie">挂机配额</option>
						</select></dd>
					</div>
					<div id="show_m1" style="display: inherit">
					
					<div class="pb2">
						<div class="radio pt2 pb2"><i class="icon icon-vip qing f10 mr1 v-2"></i> <label class="i-checks"> <input class="vipvar" type="radio" name="vipver" value="1" onclick="ajax_get(1,0);"> <i></i> <b>包月VIP -
							1个月</b>
											<span class="ml3 f3 hong">优惠</span>
							</label></div>
						<div class="radio pt2 pb2"><i class="icon icon-vip qing f10 mr1 v-2"></i> <label class="i-checks"> <input class="vipvar" type="radio" name="vipver" value="2" onclick="ajax_get(2,0);" checked="checked">
							<i></i> <b>包季VIP - 3个月</b>
											<span class="ml3 f3 hong">优惠</span>
							</label></div>
						<div class="radio pt2 pb2"><i class="icon icon-vip qing f10 mr1 v-2"></i> <label class="i-checks"> <input class="vipvar" type="radio" name="vipver" value="3" onclick="ajax_get(3,0);" checked="checked">
							<i></i> <b>双季VIP - 6个月</b>
											<span class="ml3 f3 hong">优惠</span>
							 </label></div>
						<div class="radio pt2 pb2"><i class="icon icon-vip qing f10 mr1 v-2"></i> <label class="i-checks"> <input class="vipvar" type="radio" name="vipver" value="4" onclick="ajax_get(4,0);"> <i></i> <b>年费VIP -
							12个月</b>
											<span class="ml3 f3 hong">优惠</span>
							 </label></div>
					</div>
					</div>
					<div id="show_m2" style="display: none">
					<div class="pb2">
						<div class="radio pt2 pb2"><i class="icon icon-shuju qing f10 mr1 v-2"></i> <label class="i-checks"> <input type="radio" name="peiever" value="1" onclick="ajax_get(1,1);"> <i></i> <b>1个配额 - 永久</b>
							</label>
						</div>
						<div class="radio pt2 pb2"><i class="icon icon-shuju qing f10 mr1 v-2"></i> <label class="i-checks"> <input type="radio" name="peiever" value="2" onclick="ajax_get(2,1);" checked="checked"> <i></i> <b>3个配额
							- 永久</b>
							</label></div>
						<div class="radio pt2 pb2"><i class="icon icon-shuju qing f10 mr1 v-2"></i> <label class="i-checks"> <input type="radio" name="peiever" value="3" onclick="ajax_get(3,1);"> <i></i> <b>5个配额 - 永久</b>
							</label></div>
						<div class="radio pt2 pb2"><i class="icon icon-shuju qing f10 mr1 v-2"></i> <label class="i-checks"> <input type="radio" name="peiever" value="4" onclick="ajax_get(4,1);"> <i></i> <b>10个配额 -
							永久</b>
							</label></div>
					</div>
					</div>
					<div class="pt4 pb4 f5" id="jiage">-</div>
					<div class="mt6">
						<button class="btn btn-qing btn-md w" onclick="ajax_cz();">确 定 充 值</button>
					</div>
					<div class="in-list in-t top mt8 mb3 f2 hui">
						<dl>
							<dd>发现充值后没有到账的情况,请快速联系站长QQ:{:config('web_user_qq')}</dd>
						</dl>
					</div>
				</div>
    </ul> 
   </div> 
  </div>
   <script>
	function ajax_get(id,type) {
        x.ajax('{:url('daili_ajax/cz',['act'=>'price'])}', 'type='+ type +'&id=' + id);
    }

    function ajax_cz() {
        var uid = $("input[name='uid']").val();
		var vip_ver = $('input[name="vipver"]:checked').val();
		var peie_ver = $('input[name="peiever"]:checked').val();
		var type = $("select[name='type']").val();
		if (uid == '' || uid == undefined || uid == null) {
			x.msg('充值的用户UID不能为空');
		}else{
        x.ajax('{:url('daili_ajax/cz',['act'=>'cz'])}', '&vip_ver=' + vip_ver + '&peie_ver='+ peie_ver +'&type='+ type +'&uid='+ uid);
		}
    }

    $(function ($) {
        ajax_get(3,0);
    });
    $("select[name='type']").change(function () {
		if ($(this).val() == 'vip') {
			$("#show_m1").css("display", "inherit");
			$("#show_m2").css("display", "none");
			ajax_get(3,0);
		} else {
			$("#show_m1").css("display", "none");
			$("#show_m2").css("display", "inherit");
			ajax_get(2,1);
		}
	});
	if ($("select[name='type']").val() == 'vip') {
		$("#show_m1").css("display", "inherit");
		$("#show_m2").css("display", "none");
		ajax_get(3,0);
	}
	</script>